projects
/
babl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f68079d
)
babl_parse_double: permit 0 and 9 after .
author
Øyvind Kolås
<pippin@gimp.org>
Sun, 21 Jun 2015 20:25:41 +0000
(22:25 +0200)
committer
Øyvind Kolås
<pippin@gimp.org>
Sun, 21 Jun 2015 20:26:25 +0000
(22:26 +0200)
spotted by massimo, before this fix BABL_TOLERANCE < 0.1 and != 0 was not
possible.
babl/babl-internal.h
patch
|
blob
|
history
diff --git
a/babl/babl-internal.h
b/babl/babl-internal.h
index eb80dd02652987746c9c2c05d4043166361df9dc..ef5411f997ca06a05815dbd83d5338485968a56e 100644
(file)
--- a/
babl/babl-internal.h
+++ b/
babl/babl-internal.h
@@
-305,7
+305,7
@@
static inline double babl_parse_double (const char *str)
{
char *p = strchr (str, '.') + 1;
double d = 10;
- for (;*p && *p >
'0' && *p <
'9';p++, d *= 10)
+ for (;*p && *p >
= '0' && *p <=
'9';p++, d *= 10)
{
if (result >= 0)
result += (*p - '0') / d;